package org.apache.harmony.javax.security.sasl;

import java.io.Serializable;
import org.apache.harmony.javax.security.auth.callback.Callback;

public class AuthorizeCallback
  implements Callback, Serializable
{
  private static final long serialVersionUID = 1375813227L;
  private final String authenticationID;
  private final String authorizationID;
  private boolean authorized;
  private String authorizedID;

  public AuthorizeCallback(String paramString1, String paramString2)
  {
    this.authenticationID = paramString1;
    this.authorizationID = paramString2;
    this.authorizedID = paramString2;
  }

  public String getAuthenticationID()
  {
    return this.authenticationID;
  }

  public String getAuthorizationID()
  {
    return this.authorizationID;
  }

  public String getAuthorizedID()
  {
    String str;
    if (this.authorized)
      str = this.authorizedID;
    while (true)
    {
      return str;
      str = null;
    }
  }

  public boolean isAuthorized()
  {
    return this.authorized;
  }

  public void setAuthorized(boolean paramBoolean)
  {
    this.authorized = paramBoolean;
  }

  public void setAuthorizedID(String paramString)
  {
    if (paramString != null)
      this.authorizedID = paramString;
  }
}